package lab01;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.Random;
import java.util.Scanner;

public class Test08 {
    public static void main(String[] args) {
        int number=new Random().nextInt(101);
        System.out.println(number);
        System.out.println("请输入数（1~100）：");
        int num=new Scanner(System.in).nextInt();
        while(number!=num){

            if(number>num){
                System.out.println("猜小了");
                num=new Scanner(System.in).nextInt();
            }
            if(number<num){
                System.out.println("猜大了");
                num=new Scanner(System.in).nextInt();
            }
        }
        System.out.println("猜对了");
    }
}
